Track

fun SliderDefaults.Track(sliderState: SliderState, modifier: Modifier = Modifier, colors: SliderColors = colors(), enabled: Boolean = true, thumbTrackGapSize: Dp = ThumbTrackGapSize, trackInsideCornerSize: Dp = TrackInsideCornerSize, drawStopIndicator: DrawScope.(Offset) -> Unit? = { drawStopIndicator( offset = it, color = @Suppress("INVISIBLE_REFERENCE") colors.trackColor(enabled, active = true), size = TrackStopIndicatorSize ) }, waveLength: Dp = SliderDefaults.WaveLength, waveHeight: Dp = SliderDefaults.WaveHeight, waveVelocity: WaveVelocity = SliderDefaults.WaveVelocity, waveThickness: Dp = SliderDefaults.WaveThickness, trackThickness: Dp = SliderDefaults.TrackThickness, incremental: Boolean = SliderDefaults.Incremental, animationSpecs: WaveAnimationSpecs = SliderDefaults.WaveAnimationSpecs)(source)

The Default track for WavySlider.

Parameters

sliderState

SliderState which is used to obtain the current active track.

modifier

the Modifier to be applied to the track.

colors

SliderColors that will be used to resolve the colors used for this track in different states. See SliderDefaults.colors.

enabled

controls the enabled state of this slider. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

thumbTrackGapSize

size of the gap between the thumb and the track.

trackInsideCornerSize

size of the corners towards the thumb when a gap is set.

drawStopIndicator

lambda that will be called to draw the stop indicator at the end of the track.

waveLength

the distance over which the wave's shape repeats.

waveHeight

the total height of the wave (from crest to trough i.e. amplitude * 2). The final rendered height of the wave will be waveHeight + waveThickness.

waveVelocity

the horizontal movement (speed per second and direction) of the whole wave (aka phase shift). Setting speed to 0.dp or less stops the movement.

waveThickness

the thickness of the active line (whether animated or not).

trackThickness

the thickness of the inactive line.

incremental

whether to gradually increase height from zero at start to waveHeight at thumb.

animationSpecs

animation configurations used for various properties of the wave.


fun SliderDefaults.Track(sliderPositions: SliderPositions, modifier: Modifier = Modifier, colors: SliderColors = colors(), enabled: Boolean = true, waveLength: Dp = SliderDefaults.WaveLength, waveHeight: Dp = SliderDefaults.WaveHeight, waveVelocity: WaveVelocity = SliderDefaults.WaveVelocity, waveThickness: Dp = SliderDefaults.WaveThickness, trackThickness: Dp = SliderDefaults.TrackThickness, incremental: Boolean = SliderDefaults.Incremental, animationSpecs: WaveAnimationSpecs = SliderDefaults.WaveAnimationSpecs)(source)

Deprecated

Use the variant that supports SliderState

The Default track for WavySlider.

Parameters

sliderPositions

SliderPositions which is used to obtain the current active track.

modifier

the Modifier to be applied to the track.

colors

SliderColors that will be used to resolve the colors used for this track in different states. See SliderDefaults.colors.

enabled

controls the enabled state of this WavySlider. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

waveLength

the distance over which the wave's shape repeats.

waveHeight

the total height of the wave (from crest to trough i.e. amplitude * 2). The final rendered height of the wave will be waveHeight + waveThickness.

waveVelocity

the horizontal movement (speed per second and direction) of the whole wave (aka phase shift). Setting speed to 0.dp or less stops the movement.

waveThickness

the thickness of the active line (whether animated or not).

trackThickness

the thickness of the inactive line.

incremental

whether to gradually increase height from zero at start to waveHeight at thumb.

animationSpecs

animation configurations used for various properties of the wave.